package net.huashitong.ssydt.exam.entity.vo;

import io.swagger.annotations.ApiModelProperty;
import net.huashitong.ssydt.exam.entity.SsExamQuestion;

import java.io.Serializable;
import java.util.List;

/**
 * @author <a href="mailto:yhy23456@163.com">huiyang.yu</a>
 * @since 2017.09.12
 */
public class BaseQuestion implements Serializable {

    private static final long serialVersionUID = -1827583047267067249L;

    @ApiModelProperty(value = "选择题id")
    private Long questionId;//选择题id
    @ApiModelProperty(value = "问题")
    private String question;//问题
    @ApiModelProperty(value = "解析")
    private String analysis;//解析
    @ApiModelProperty(value = "题目类型 01单选 02多选 03不定项")
    private String questionType;//题目类型
    @ApiModelProperty(value = "是否重点题")
    private Boolean isEmphasis;//是否重点题
    @ApiModelProperty(value = "是否时事卡")
    private Boolean isCard;//是否时事卡
    @ApiModelProperty(value = "选项列表")
    private List<Option> options;

    @ApiModelProperty(value = "是否收藏")
    private Boolean isCollection = false;//是否收藏

    public BaseQuestion() {
    }

    public BaseQuestion(SsExamQuestion ssExamQuestion) {
        this.questionId = ssExamQuestion.getId();
        this.question = ssExamQuestion.getQuestion();
        this.analysis = ssExamQuestion.getAnalysis();
        this.questionType = ssExamQuestion.getQuestionType();
        this.isEmphasis = ssExamQuestion.getIsEmphasis().compareTo((byte) 1) == 0;
        this.isCard = ssExamQuestion.getIsCard().compareTo((byte) 1) == 0;
    }

    public Long getQuestionId() {
        return questionId;
    }

    public void setQuestionId(Long questionId) {
        this.questionId = questionId;
    }

    public String getQuestion() {
        return question;
    }

    public void setQuestion(String question) {
        this.question = question;
    }

    public String getAnalysis() {
        return analysis;
    }

    public void setAnalysis(String analysis) {
        this.analysis = analysis;
    }

    public String getQuestionType() {
        return questionType;
    }

    public void setQuestionType(String questionType) {
        this.questionType = questionType;
    }

    public Boolean getIsEmphasis() {
        return isEmphasis;
    }

    public void setIsEmphasis(Boolean emphasis) {
        isEmphasis = emphasis;
    }

    public Boolean getIsCard() {
        return isCard;
    }

    public void setIsCard(Boolean card) {
        isCard = card;
    }

    public List<Option> getOptions() {
        return options;
    }

    public void setOptions(List<Option> options) {
        this.options = options;
    }

    public Boolean getIsCollection() {
        return isCollection;
    }

    public void setIsCollection(Boolean collection) {
        isCollection = collection;
    }
}
